{% extends 'tend/account/common/base.html' %}
{% import "tend/macros/_patination.html" as page_macros %}
{% block css %}
{{super()}}
<link href="{{ url_for('main.static', filename='css/account.css')}}" rel="stylesheet">
<style>
    .list-group-item {
        background-color: inherit;
    }
</style>
{% endblock %}
{% block contents %}

<div class="container">
    <div class="row justify-content-md-center mt-5">
        <h2>系统只保留30天内数据</h2>
        <table class="table table-bordered">
            <thead>
                <tr>
                    <th scope="col">订单号</th>
                    <th scope="col">描述</th>
                    <th scope="col">金额</th>
                    <th scope="col">时间</th>
                </tr>
            </thead>
            <tbody>
                {% for d in pagelist.items %}
                <tr>
                    <th scope="row">{{d.order_no}}</th>
                    {% if d.action_type == '文章付费' %}
                    {% set article = get_article_by_id(d.ref_id)%}
                    <th><a href="{{url_for('main.article',name= article.name)}}">{{d.subject}}</a></th>
                    {% else %}
                    <td>{{d.subject}}</td>
                    {% endif %}
                    <td>{{ d.total_fee }}</td>
                    <td>{{d.ctime}}</td>

                </tr>
                {% endfor %}
            </tbody>
        </table>
        {{ page_macros.pagination_widget(pagelist, '.pay_logs') }}
    </div>


</div>
{% endblock %}
{% block js %}
{{ super() }}
{% endblock %}